package com.mspbots.core.teams.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mspbots.core.DefaultBaseService;
import com.mspbots.core.RestMessageObject;
import com.mspbots.core.teams.TeamsUserMessageController;
import com.mspbots.core.teams.model.CheckBeforeOut;
import com.mspbots.core.teams.model.TeamsUserMessage;
import com.mspbots.core.wise.model.dto.UserMappingResponse;

import java.util.Map;

/**
 * @author billb
 */
public interface TeamsUserMessageService extends DefaultBaseService<TeamsUserMessage> {

    /**
     * save entity database
     *
     * @param entity TeamsUserMessage
     * @return TeamsUserMessage entity
     */
    TeamsUserMessage saveOnUser(TeamsUserMessage entity);

    /**
     * select page model result
     *
     * @param page        page model
     * @param queryParams query params
     * @return page model
     */
    IPage<TeamsUserMessage> selectPage(Page<TeamsUserMessage> page, TeamsUserMessage queryParams);

    /**
     * teams bot sender message
     *
     * @param message sender message str
     * @param body    sender user body
     * @return object entity
     */
    Object messageHandlers(String message, TeamsUserMessageController.SenderMessageBody body);

    CheckBeforeOut checkUtilizationBeforeOut(String teamsUserId, String time);

    RestMessageObject checkBeforeOut(String teamsUserId, String time);

    Map<String, Object> getTimeEntryDurationTest(UserMappingResponse mapping);
}
